package com.example.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ActivityPrizeStatusEnum {
    INIT(1, "初始化"),
    COMPLETED(2, "已抽取");

    private final Integer code;
    private final String message;

    public static ActivityPrizeStatusEnum forName(String name) {
        for (ActivityPrizeStatusEnum activity: ActivityPrizeStatusEnum.values()) {
            if (activity.name().equalsIgnoreCase(name)) {
                return activity;
            }
        }
        return null;
    }
}
